1. Field of the Invention
The present invention relates generally to a computer-based memory system, and, more particularly, to defining objects and cache controls using XML-schema.
2. Description of the Related Art
Performance-oriented and disconnected applications are typically executed on caching-based computer systems. Caching occurs any time content or resources are retrieved, assembled or created, and then stored for later use. Caching often delivers increases in overall performance. Furthermore, it reduces the dependency on resource availability (e.g., the network, the cached resource).
An issue computer architects and developers struggle with is maintaining data freshness. The data being cached generally has a limited, useful life span. That is, at some point, the data in the cache may no longer accurately reflect the data at the source. At this point, the invalid data (i.e., the data in the cache) can either be purged, or it can be refreshed.
There are a number of known approaches to purging or refreshing the invalid data. First, an application may systematically refresh the invalid data given a satisfied condition (e.g., time, access). Second, a more advanced solution may provide a messaging-based solution where caches listen and post changes to a common message bus. A source may submit data changes to the message bus, or the caches can potentially provide refresh and publish functionality. Third, databases may have a timestamp field to enable querying of recently changed objects. This type of query often helps with synchronization, and is often referred to as polling. With polling, the source data is checked periodically to see if it has changed, and the source data is pulled only if it has changed. Fourth, the Hypertext Transfer Protocol (“HTTP”) specification may attempt to address the issue of purging or refreshing the invalid data using special meta tags called cache control headers, as specified by the HTTP protocol specification. The cache control headers are directed to browsers and proxy servers to specify how long to cache the resource and when to check for a new resource.
Each of the above approaches share the same problem—the caching policy (i.e., the rules for purging or refreshing the invalid data) is either hard-coded into the application or part of a separate file accessed by the application, and is not part of the data itself.
For example, consider an implementation of the caching policy using HTTP/HTML (Hypertext Transfer Protocol/Hypertext MarkUp Language). As used herein, a “cache directive” refers to part of the HTTP protocol that determines how data is to be treated if cached. Cache directives are implemented as meta tags in HTTP/HTML. According to HTTP/HTML, the meta tags apply to the entire webpage containing the meta tags, and are specific to applications capable of accessing the webpage (e.g., a web browser). Meta tags cannot be interpreted by an application not using HTTP/HTML. Further, most applications not using HTTP/HTML do not store cache directives relative to the data represented by the directives.